﻿using System.Runtime.Serialization;
using EasyComm.Base;
using EasyComm.Base.Hosting;

namespace EasyComm.ServiceUnit
{
    [DataContract]
    public class AdminServiceUnit<TContract> : ServiceUnitBase<TContract>
        where TContract : class
    {
        [DataMember]
        public AdminServiceType Type { get; set; }

        public AdminServiceUnit(EasyCommServiceHostBase serviceHost)
            : base(serviceHost)
        {

        }

        public override string ToString()
        {
            return string.Format("[{0}] {1}", Type, base.ListenUri);
        }
    }
}
